<template>
  <div class="param-info" v-if="Object.keys(paramInfo).length !== 0">
    <p>参数信息</p>
    <table class="info-size" :key="index" v-for="(table, index) in paramInfo.sizes">
      <tr :key="indey" v-for="(tr, indey) in table">
        <td :key="indez" v-for="(td, indez) in tr">{{td}}</td>
      </tr>
    </table>
    <table class="info-param">
      <tr :key="index" v-for="(item, index) in paramInfo.infos">
        <td class="param-key">{{item.key}}</td>
        <td class="param-value">{{item.value}}</td>
      </tr>
    </table>
    <div class="info-images" v-if="paramInfo.images">
      <img :src="img" alt="" v-for="img in paramInfo.images">
    </div>
  </div>
</template>

<script>
export default {
  props: {
    paramInfo: {
      type: Object,
      default() {
        return {};
      }
    }
  }
}
</script>

<style scoped>
.param-info {
  font-size: 14px;
  padding: 20px 15px;
  border-bottom: 5px solid #f2f5f8;
}

.param-info p {
  font-size: 15px;
  margin-bottom: 10px;
}

.param-info table {
  width: 100%;
  border-collapse: collapse;
}

.param-info table tr {
  height: 42px;
  border-bottom: 1px solid rgba(100,100,100,.1);
}

.info-param {
  border-top: 1px solid rgba(0,0,0,.1);
}

.info-param .param-key {
  width: 95px;
}

.info-param .param-value {
  color: var(--color-tint);
}

.info-images img {
  width: 100%;
}
</style>